package org.fjsei.yewu.job.controller.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import jakarta.validation.constraints.NotNull;
import lombok.*;

import java.io.Serializable;
import java.util.Map;

@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
@Builder
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CreateJobDetailsRequestModel implements Serializable {
    @NotNull
    private String jobName;

    @NotNull
    private String groupName;
    /**按照前端给的类的名字，动态找出作业class的源代码的;
     * */
    private String jobClassName;
    //Quartz 的 cron 表达式与 Unix/Linux 的 cron 表达式略有不同，特别是在秒和年字段上。
    //每隔30秒做一次的 .cron.expression=0/30 * * * * ?
    private String cronExpression;
    private String description;
    private Integer from;
    private Integer to;
    //.requestRecovery(createJobDetailsRequestModel.isRequestRecovery())
    private boolean requestRecovery;
    private Map<String, String> mapData;
}
